alignmentGuide
为视图的某个对齐设置显式对齐 guide,用于微调它在 stack 中与兄弟视图的对齐方式。
alignmentGuide?: { alignment, value, offset? }
alignment—— 要设置哪个 guide:HorizontalAlignment("leading"、"center"、"trailing")或VerticalAlignment("top"、"center"、"bottom"、"firstTextBaseline"、"lastTextBaseline")。value—— 二选一:- 数字 —— 常量 guide;或
- 关键字 —— 相对视图自身尺寸解析:
"width"/"height"—— 视图实测尺寸"leading"/"trailing"/"top"/"bottom"/"center"—— 视图的边/中心 guide"firstTextBaseline"/"lastTextBaseline"—— 视图的文本基线
offset?—— 在解析值基础上叠加的数字偏移。
注意: 仅支持上述声明式形态。SwiftUI 那个在布局期运行的任意
computeValue闭包无法桥接到脚本,故不提供。
